<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>My JSP 'add.jsp' starting page</title>
<link href="<%=basePath%>manager/css/style.css" rel="stylesheet"
	type="text/css" />
<script type="text/javascript"
	src="<%=basePath%>common/js/jQuery-1.9.1.js"></script>
</head>

<s:action name="findAll" namespace="/manager_roletab" />
<s:action name="loading" namespace="/manager_userrole">
	<s:param name="ubId"><%=request.getParameter("ubId")%></s:param>
</s:action>

<body>
	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a
				href="<%=application.getContextPath()%>/common/pager/welcome.jsp">首页</a></li>
			<li>用户管理</li>
			<li><a
				href="<%=application.getContextPath()%>/manager/user/list.jsp">用户列表</a></li>
			<li>设置用户角色</li>
		</ul>
	</div>

	<div class="formbody">

		<div class="formtitle">
			<span>角色菜单信息</span>
		</div>

		<form action="../../manager_userrole/update" id="addForm"
			method="post">
			<input type="hidden" id="ubId" name="ubId" value="${userBasic.ubId}" />
			<input type="hidden" id="rtId" name="rtId" value="${rtId}" />
			<ul class="forminfo">
				<li><label>用户编号</label> <input id="ubId" name="ubId"
					type="text" class="dfinput" value="${userBasic.ubId}" /></li>
				<li><label>电话号</label> <input type="text" class="dfinput"
					value="${userBasic.ubPhone}" disabled="disabled" /></li>
				<li><label>邮箱</label> <input type="text" class="dfinput"
					value="${userBasic.ubEmail}" disabled="disabled" /></li>
				<li><label>角色列表</label>
					<div style="width: 100%;">
						<c:forEach items="${rtList}" var="rt" varStatus="i">
							<span
								style="font-size:15px; width:200px; padding: 0 0; margin: 0 0; float:left;">
								<input name="checkedStatus"
								style="height: 20px; width: 20px; line-height: 30px; "
								id="checkedStatus" type="checkbox" value="${rt.rtId }"
								<c:forEach items="${urList}" var="ur">
								<c:if test="${rt.rtId == ur.roleTab.rtId}">
									checked='checked'
								</c:if>
							</c:forEach> />${rt.rtName}
							</span>
							<c:if test="${(i.index+1) % 4 == 0}">
								<span style="clear: both;"></span>
								<label>&nbsp;</label>
							</c:if>
						</c:forEach>
					</div></li>
				<li><label>&nbsp;</label> <input type="button" class="btn"
					value="确认修改"
					onclick="javascript:$('.tip').css('display', 'block');" />&nbsp;<input
					type="button" class="btn" value="返回"
					onclick="javascript:location.href='<%=basePath%>/manager/user/list.jsp'" /></li>
				</li>
				<div class="tip">
					<div class="tiptop">
						<span>提示信息</span><a
							onclick="javascript:$('.tip').css('display', 'none');"></a>
					</div>

					<div class="tipinfo">
						<span><img src="<%=basePath%>/manager/images/ticon.png" /></span>
						<div class="tipright">
							<p>是否确认对信息的修改 ？</p>
							<cite>如果是请点击确定按钮 ，否则请点取消。</cite>
						</div>
					</div>

					<div class="tipbtn">
						<input type="submit" " class="sure" value="确定" />&nbsp; <input
							type="button" class="cancel" value="取消"
							onclick="javascript:$('.tip').css('display', 'none');" />
					</div>
				</div>
			</ul>
		</form>
	</div>
</body>
</html>
